#include <iostream>
#include <vector>
#include <string>
using namespace std;

// 字母A-Z的镜像串
string reverse = "A   3  HIL JM O   2TUVWXY51SE Z  8 ";

vector<string> msg = {
    " a mirrored string.",
    " not a palindrome.",
    " a regular palindrome.",
    " a mirrored palindrome."
};


char Reverse(char ch){
    if(ch>='A' && ch<='Z'){
        return reverse[ch-'A'];
    }
    return reverse[ch-'0'+25];
}


int main(){
    string s;
    while (cin>>s)
    {
        bool mirrored = true;
        bool palindrome = true;
        for (int i=0; i<=s.size()/2; i++) {
            if(s[i] != s[s.size()-1-i]) {
                palindrome = false;
            }
            if(s[i] != Reverse(s[s.size()-1-i])) {
                mirrored = false;
            }
        }
        cout<<s<<" -- is";
        if(mirrored && palindrome) {
            cout << msg[3];
        } else if(mirrored) {
            cout << msg[0];
        } else if(palindrome) {
            cout << msg[2];
        } else {
            cout << msg[1];
        }
        cout<<"\n"<<endl;
    }
    return 0;
}